package com.lejin.user.controller;


import com.lejin.user.service.ISysUserService;
import com.lejin.user.service.impl.SysUserServiceImpl;
import com.lejin.usercenter.entity.SysUser;
import com.lejin.vo.ResultVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.support.RequestDataValueProcessor;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luminghua
 * @since 2022-04-20
 */
@RestController
@RequestMapping("/user/")
public class SysUserController {

    @Autowired
    private SysUserServiceImpl userService;

    @RequestMapping("login")
    public ResultVO login(@RequestBody SysUser user){
        return userService.login(user);
    }


    @RequestMapping("register")
    public ResultVO register(@RequestBody SysUser user){return userService.register(user);}
}
